<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Test::Inline - Embed your tests in your code, next to what is being tested - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Test-Inline - MetaCPAN" href="https://metacpan.org/dist/Test-Inline/releases.rss" />
        <link rel="canonical" href="./Test::Inline.html" />
        <meta name="description" content="Embed your tests in your code, next to what is being tested" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Test::Inline" />
<meta name="twitter:title"       content="Test::Inline" />
<meta name="twitter:description" content="Embed your tests in your code, next to what is being tested" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Test::Inline.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Test-Inline was released.">
      <span class="relatize">23 Jan 2021 22:44:04 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Test-Inline">Test-Inline</a>
  </li>
  <li>
    Module version: 2.214
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Test-Inline/source/lib/Test/Inline.pm">Source</a>
    (<a href="https://metacpan.org/dist/Test-Inline/source/lib/Test/Inline.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Test-Inline/source/lib/Test">Browse</a>
    (<a href="https://metacpan.org/dist/Test-Inline/source/lib/Test?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Test-Inline/changes">Changes</a>
    </li>
    <li>
      <a rel="noopener nofollow" class="nopopup" href="https://github.com/karenetheridge/Test-Inline">Homepage</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Test-Inline/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/karenetheridge/Test-Inline">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Inline">Issues</a>
      (20)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Test-Inline+2.214" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Test-Inline.html?oncpan=1&amp;distmat=1&amp;version=2.214&amp;grade=2" style="color: #090">112</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Test-Inline.html?oncpan=1&amp;distmat=1&amp;version=2.214&amp;grade=3" style="color: #900">8</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Test-Inline.html?oncpan=1&amp;distmat=1&amp;version=2.214&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/ETHER/Test-Inline-2.214">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Test-Inline who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 1
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Test-Inline-2.214/index.html">80.03% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li>
      Perl: v5.6.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Test-Inline/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-Inline-2.214.tar.gz">
      Download (<span itemprop="fileSize">58.99KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FETHER%2FTest-Inline-2.214%2Flib%2FTest%2FInline.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Test-Inline/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Test-Inline/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Test-Inline">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Test-Inline">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Test/Inline.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="ETHER/Test-Inline-2.214"
>2.214
  (ETHER on 2021-01-23)</option>
<option
  
  value="ADAMK/Test-Inline-2.213"
>2.213
  (ADAMK on 2013-04-09)</option>
<option
  
  value="ADAMK/Test-Inline-2.212"
>2.212
  (ADAMK on 2010-11-22)</option>
<option
  
  value="ADAMK/Test-Inline-2.211"
>2.211
  (ADAMK on 2009-07-14)</option>
<option
  
  value="ADAMK/Test-Inline-2.210"
>2.210
  (ADAMK on 2009-05-20)</option>
<option
  
  value="ADAMK/Test-Inline-2.209"
>2.209
  (ADAMK on 2009-04-18)</option>
<optgroup label="BackPAN">'
<option
  
  value="ADAMK/Test-Inline-2.208"
>2.208
  (ADAMK on 2007-12-12)</option>
<option
  
  value="ADAMK/Test-Inline-2.207"
>2.207
  (ADAMK on 2007-08-17)</option>
<option
  
  value="ADAMK/Test-Inline-2.206"
>2.206
  (ADAMK on 2007-08-17)</option>
<option
  
  value="ADAMK/Test-Inline-2.205"
>2.205
  (ADAMK on 2007-07-15)</option>
<option
  
  value="ADAMK/Test-Inline-2.204"
>2.204
  (ADAMK on 2007-07-12)</option>
<option
  
  value="ADAMK/Test-Inline-2.203"
>2.203
  (ADAMK on 2007-07-11)</option>
<option
  
  value="ADAMK/Test-Inline-2.202"
>2.202
  (ADAMK on 2007-07-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.201"
>2.201
  (ADAMK on 2007-01-16)</option>
<option
  
  value="ADAMK/Test-Inline-2.200"
>2.200
  (ADAMK on 2007-01-13)</option>
<option
  
  value="ADAMK/Test-Inline-2.105"
>2.105
  (ADAMK on 2006-10-02)</option>
<option
  
  value="ADAMK/Test-Inline-2.103"
>2.103
  (ADAMK on 2005-09-28)</option>
<option
  
  value="ADAMK/Test-Inline-2.102"
>2.102
  (ADAMK on 2005-09-22)</option>
<option
  
  value="ADAMK/Test-Inline-2.101"
>2.101
  (ADAMK on 2005-09-13)</option>
<option
  
  value="ADAMK/Test-Inline-2.100"
>2.100
  (ADAMK on 2005-07-14)</option>
<option
  
  value="ADAMK/Test-Inline-2.099_02"
>2.099_02 DEV
  (ADAMK on 2005-07-11)</option>
<option
  
  value="ADAMK/Test-Inline-2.099_01"
>2.099_01 DEV
  (ADAMK on 2005-07-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.002"
>2.002
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.001"
>2.001
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_10"
>2.00_10 DEV
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_09"
>2.00_09 DEV
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_08"
>2.00_08 DEV
  (ADAMK on 2005-05-20)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_07"
>2.00_07 DEV
  (ADAMK on 2005-05-20)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_06"
>2.00_06 DEV
  (ADAMK on 2005-05-18)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_05"
>2.00_05 DEV
  (ADAMK on 2005-03-26)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_04"
>2.00_04 DEV
  (ADAMK on 2005-03-25)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_03"
>2.00_03 DEV
  (ADAMK on 2005-03-21)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_02"
>2.00_02 DEV
  (ADAMK on 2005-03-21)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_01"
>2.00_01 DEV
  (ADAMK on 2005-03-18)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.16"
>0.16
  (MSCHWERN on 2003-12-18)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.15"
>0.15
  (MSCHWERN on 2002-04-11)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.14"
>0.14
  (MSCHWERN on 2002-02-28)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.12"
>0.12
  (MSCHWERN on 2001-11-12)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.11"
>0.11
  (MSCHWERN on 2001-08-30)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.10"
>0.10
  (MSCHWERN on 2001-08-29)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/ETHER/Test-Inline-2.214/diff/' + encodeURIComponent(this.value) + '/lib/Test/Inline.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="ETHER/Test-Inline-2.214"
>2.214
  (ETHER on 2021-01-23)</option>
<option
  
  value="ADAMK/Test-Inline-2.213"
>2.213
  (ADAMK on 2013-04-09)</option>
<option
  
  value="ADAMK/Test-Inline-2.212"
>2.212
  (ADAMK on 2010-11-22)</option>
<option
  
  value="ADAMK/Test-Inline-2.211"
>2.211
  (ADAMK on 2009-07-14)</option>
<option
  
  value="ADAMK/Test-Inline-2.210"
>2.210
  (ADAMK on 2009-05-20)</option>
<option
  
  value="ADAMK/Test-Inline-2.209"
>2.209
  (ADAMK on 2009-04-18)</option>
<optgroup label="BackPAN">'
<option
  
  value="ADAMK/Test-Inline-2.208"
>2.208
  (ADAMK on 2007-12-12)</option>
<option
  
  value="ADAMK/Test-Inline-2.207"
>2.207
  (ADAMK on 2007-08-17)</option>
<option
  
  value="ADAMK/Test-Inline-2.206"
>2.206
  (ADAMK on 2007-08-17)</option>
<option
  
  value="ADAMK/Test-Inline-2.205"
>2.205
  (ADAMK on 2007-07-15)</option>
<option
  
  value="ADAMK/Test-Inline-2.204"
>2.204
  (ADAMK on 2007-07-12)</option>
<option
  
  value="ADAMK/Test-Inline-2.203"
>2.203
  (ADAMK on 2007-07-11)</option>
<option
  
  value="ADAMK/Test-Inline-2.202"
>2.202
  (ADAMK on 2007-07-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.201"
>2.201
  (ADAMK on 2007-01-16)</option>
<option
  
  value="ADAMK/Test-Inline-2.200"
>2.200
  (ADAMK on 2007-01-13)</option>
<option
  
  value="ADAMK/Test-Inline-2.105"
>2.105
  (ADAMK on 2006-10-02)</option>
<option
  
  value="ADAMK/Test-Inline-2.103"
>2.103
  (ADAMK on 2005-09-28)</option>
<option
  
  value="ADAMK/Test-Inline-2.102"
>2.102
  (ADAMK on 2005-09-22)</option>
<option
  
  value="ADAMK/Test-Inline-2.101"
>2.101
  (ADAMK on 2005-09-13)</option>
<option
  
  value="ADAMK/Test-Inline-2.100"
>2.100
  (ADAMK on 2005-07-14)</option>
<option
  
  value="ADAMK/Test-Inline-2.099_02"
>2.099_02 DEV
  (ADAMK on 2005-07-11)</option>
<option
  
  value="ADAMK/Test-Inline-2.099_01"
>2.099_01 DEV
  (ADAMK on 2005-07-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.002"
>2.002
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.001"
>2.001
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_10"
>2.00_10 DEV
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_09"
>2.00_09 DEV
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_08"
>2.00_08 DEV
  (ADAMK on 2005-05-20)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_07"
>2.00_07 DEV
  (ADAMK on 2005-05-20)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_06"
>2.00_06 DEV
  (ADAMK on 2005-05-18)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_05"
>2.00_05 DEV
  (ADAMK on 2005-03-26)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_04"
>2.00_04 DEV
  (ADAMK on 2005-03-25)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_03"
>2.00_03 DEV
  (ADAMK on 2005-03-21)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_02"
>2.00_02 DEV
  (ADAMK on 2005-03-21)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_01"
>2.00_01 DEV
  (ADAMK on 2005-03-18)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.16"
>0.16
  (MSCHWERN on 2003-12-18)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.15"
>0.15
  (MSCHWERN on 2002-04-11)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.14"
>0.14
  (MSCHWERN on 2002-02-28)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.12"
>0.12
  (MSCHWERN on 2001-11-12)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.11"
>0.11
  (MSCHWERN on 2001-08-30)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.10"
>0.10
  (MSCHWERN on 2001-08-29)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Algorithm::Dependency" title="Algorithm::Dependency" class="ellipsis">Algorithm::Dependency</a></li>
  <li><a href="https://metacpan.org/pod/Algorithm::Dependency::Item" title="Algorithm::Dependency::Item" class="ellipsis">Algorithm::Dependency::Item</a></li>
  <li><a href="https://metacpan.org/pod/Algorithm::Dependency::Ordered" title="Algorithm::Dependency::Ordered" class="ellipsis">Algorithm::Dependency::Ordered</a></li>
  <li><a href="https://metacpan.org/pod/Algorithm::Dependency::Source" title="Algorithm::Dependency::Source" class="ellipsis">Algorithm::Dependency::Source</a></li>
  <li><a href="./Config::Tiny.html" title="Config::Tiny" class="ellipsis">Config::Tiny</a></li>
  <li><a href="./File::Find::Rule.html" title="File::Find::Rule" class="ellipsis">File::Find::Rule</a></li>
  <li><a href="https://metacpan.org/pod/File::Flat" title="File::Flat" class="ellipsis">File::Flat</a></li>
  <li><a href="./File::Remove.html" title="File::Remove" class="ellipsis">File::Remove</a></li>
  <li><a href="https://metacpan.org/pod/File::Spec" title="File::Spec" class="ellipsis">File::Spec</a></li>
  <li><a href="https://metacpan.org/pod/File::Spec::Functions" title="File::Spec::Functions" class="ellipsis">File::Spec::Functions</a></li>
  <li><a href="https://metacpan.org/pod/File::chmod" title="File::chmod" class="ellipsis">File::chmod</a></li>
  <li><a href="https://metacpan.org/pod/Getopt::Long" title="Getopt::Long" class="ellipsis">Getopt::Long</a></li>
  <li><a href="https://metacpan.org/pod/IO::Handle" title="IO::Handle" class="ellipsis">IO::Handle</a></li>
  <li><a href="https://metacpan.org/pod/List::Util" title="List::Util" class="ellipsis">List::Util</a></li>
  <li><a href="https://metacpan.org/pod/Params::Util" title="Params::Util" class="ellipsis">Params::Util</a></li>
  <li><a href="./Path::Tiny.html" title="Path::Tiny" class="ellipsis">Path::Tiny</a></li>
  <li><a href="https://metacpan.org/pod/overload" title="overload" class="ellipsis">overload</a></li>
  <li><a href="https://metacpan.org/pod/strict" title="strict" class="ellipsis">strict</a></li>
  <li><a href="https://metacpan.org/pod/vars" title="vars" class="ellipsis">vars</a></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Test::Inline/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Test%3A%3AInline">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Test-Inline">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/ETHER/Test-Inline-2.214/view/lib/Test/Inline.pm">This version</a>
    </li>
    <li>
      <a href="./Test::Inline.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/KEEDI"><img src="https://www.gravatar.com/avatar/95f905a7a4ccc573c711e9d264c0fde8?d=identicon&amp;s=20" title="KEEDI" alt="KEEDI"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Test-Inline/plussers">1 PAUSE user</a>
</div>
<div>
    1 non-PAUSE user
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 2 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-cpan-author="ADAMK"
      data-contrib-email="adamk@cpan.org adam@ali.as"
    >
      <a href="https://metacpan.org/author/ADAMK" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/884124d0169f41668fb3f948b2ba8b0a?d=identicon&amp;s=20" />
      Adam Kennedy
      </a>
    </li>
    <li class="contributor"
      data-cpan-author="RJBS"
      data-contrib-email="rjbs@cpan.org"
    >
      <a href="https://metacpan.org/author/RJBS" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/cec6b9b88295ead26c65f8747a76561b?d=identicon&amp;s=20" />
      Ricardo Signes
      </a>
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/ETHER" class="author-name">Karen Etheridge 🐾 🌋🦑🇹🇼🇭🇰🇺🇦</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Test/Inline.pm&#39;" class="">
<option
  selected
  value="ETHER/Test-Inline-2.214"
>2.214
  (ETHER on 2021-01-23)</option>
<option
  
  value="ADAMK/Test-Inline-2.213"
>2.213
  (ADAMK on 2013-04-09)</option>
<option
  
  value="ADAMK/Test-Inline-2.212"
>2.212
  (ADAMK on 2010-11-22)</option>
<option
  
  value="ADAMK/Test-Inline-2.211"
>2.211
  (ADAMK on 2009-07-14)</option>
<option
  
  value="ADAMK/Test-Inline-2.210"
>2.210
  (ADAMK on 2009-05-20)</option>
<option
  
  value="ADAMK/Test-Inline-2.209"
>2.209
  (ADAMK on 2009-04-18)</option>
<optgroup label="BackPAN">'
<option
  
  value="ADAMK/Test-Inline-2.208"
>2.208
  (ADAMK on 2007-12-12)</option>
<option
  
  value="ADAMK/Test-Inline-2.207"
>2.207
  (ADAMK on 2007-08-17)</option>
<option
  
  value="ADAMK/Test-Inline-2.206"
>2.206
  (ADAMK on 2007-08-17)</option>
<option
  
  value="ADAMK/Test-Inline-2.205"
>2.205
  (ADAMK on 2007-07-15)</option>
<option
  
  value="ADAMK/Test-Inline-2.204"
>2.204
  (ADAMK on 2007-07-12)</option>
<option
  
  value="ADAMK/Test-Inline-2.203"
>2.203
  (ADAMK on 2007-07-11)</option>
<option
  
  value="ADAMK/Test-Inline-2.202"
>2.202
  (ADAMK on 2007-07-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.201"
>2.201
  (ADAMK on 2007-01-16)</option>
<option
  
  value="ADAMK/Test-Inline-2.200"
>2.200
  (ADAMK on 2007-01-13)</option>
<option
  
  value="ADAMK/Test-Inline-2.105"
>2.105
  (ADAMK on 2006-10-02)</option>
<option
  
  value="ADAMK/Test-Inline-2.103"
>2.103
  (ADAMK on 2005-09-28)</option>
<option
  
  value="ADAMK/Test-Inline-2.102"
>2.102
  (ADAMK on 2005-09-22)</option>
<option
  
  value="ADAMK/Test-Inline-2.101"
>2.101
  (ADAMK on 2005-09-13)</option>
<option
  
  value="ADAMK/Test-Inline-2.100"
>2.100
  (ADAMK on 2005-07-14)</option>
<option
  
  value="ADAMK/Test-Inline-2.099_02"
>2.099_02 DEV
  (ADAMK on 2005-07-11)</option>
<option
  
  value="ADAMK/Test-Inline-2.099_01"
>2.099_01 DEV
  (ADAMK on 2005-07-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.002"
>2.002
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.001"
>2.001
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_10"
>2.00_10 DEV
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_09"
>2.00_09 DEV
  (ADAMK on 2005-06-10)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_08"
>2.00_08 DEV
  (ADAMK on 2005-05-20)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_07"
>2.00_07 DEV
  (ADAMK on 2005-05-20)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_06"
>2.00_06 DEV
  (ADAMK on 2005-05-18)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_05"
>2.00_05 DEV
  (ADAMK on 2005-03-26)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_04"
>2.00_04 DEV
  (ADAMK on 2005-03-25)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_03"
>2.00_03 DEV
  (ADAMK on 2005-03-21)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_02"
>2.00_02 DEV
  (ADAMK on 2005-03-21)</option>
<option
  
  value="ADAMK/Test-Inline-2.00_01"
>2.00_01 DEV
  (ADAMK on 2005-03-18)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.16"
>0.16
  (MSCHWERN on 2003-12-18)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.15"
>0.15
  (MSCHWERN on 2002-04-11)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.14"
>0.14
  (MSCHWERN on 2002-02-28)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.12"
>0.12
  (MSCHWERN on 2001-11-12)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.11"
>0.11
  (MSCHWERN on 2001-08-30)</option>
<option
  
  value="MSCHWERN/Test-Inline-0.10"
>0.10
  (MSCHWERN on 2001-08-29)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Test-Inline">Test-Inline-2.214</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage one &#10;
          • 5 direct dependents &#10;          • 7 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="10"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Test-Inline-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Test-Inline-2.214">
    <input type="hidden" name="author" value="ETHER">
    <input type="hidden" name="distribution" value="Test-Inline">
    <button type="submit" class="favorite highlight"><span>2</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Test::Inline.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>2</span> ++</a>
</div>
   / <span>Test::Inline</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Test::Inline.html#NAME">NAME</a></li>
  <li><a href="./Test::Inline.html#VERSION">VERSION</a></li>
  <li><a href="./Test::Inline.html#DESCRIPTION">DESCRIPTION</a>
    <ul>
      <li><a href="./Test::Inline.html#How-does-it-work?">How does it work?</a></li>
      <li><a href="./Test::Inline.html#What-is-Test::Inline-good-for?">What is Test::Inline good for?</a></li>
      <li><a href="./Test::Inline.html#What-is-Test::Inline-bad-for?">What is Test::Inline bad for?</a></li>
      <li><a href="./Test::Inline.html#Getting-Started">Getting Started</a></li>
    </ul>
  </li>
  <li><a href="./Test::Inline.html#METHODS">METHODS</a>
    <ul>
      <li><a href="./Test::Inline.html#new">new</a></li>
      <li><a href="./Test::Inline.html#exception">exception</a></li>
      <li><a href="./Test::Inline.html#InputHandler">InputHandler</a></li>
      <li><a href="./Test::Inline.html#ExtractHandler">ExtractHandler</a></li>
      <li><a href="./Test::Inline.html#ContentHandler">ContentHandler</a></li>
      <li><a href="./Test::Inline.html#OutputHandler">OutputHandler</a></li>
      <li><a href="./Test::Inline.html#add-$file,-$directory,-%5C$source,-$Handle">add $file, $directory, \$source, $Handle</a></li>
      <li><a href="./Test::Inline.html#add_class">add_class</a></li>
      <li><a href="./Test::Inline.html#add_all">add_all</a></li>
      <li><a href="./Test::Inline.html#classes">classes</a></li>
      <li><a href="./Test::Inline.html#class">class</a></li>
      <li><a href="./Test::Inline.html#filenames">filenames</a></li>
      <li><a href="./Test::Inline.html#schedule">schedule</a></li>
      <li><a href="./Test::Inline.html#manifest">manifest</a></li>
      <li><a href="./Test::Inline.html#save">save</a></li>
    </ul>
  </li>
  <li><a href="./Test::Inline.html#TO-DO">TO DO</a></li>
  <li><a href="./Test::Inline.html#ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</a></li>
  <li><a href="./Test::Inline.html#BUGS">BUGS</a></li>
  <li><a href="./Test::Inline.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Test::Inline.html#CONTRIBUTORS">CONTRIBUTORS</a></li>
  <li><a href="./Test::Inline.html#COPYRIGHT-AND-LICENSE">COPYRIGHT AND LICENSE</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Test::Inline - Embed your tests in your code, next to what is being tested</p>

<h1 id="VERSION">VERSION</h1>

<p>version 2.214</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>Embedding tests allows tests to be placed near the code being tested.</p>

<p>This is a nice supplement to the traditional .t files.</p>

<h2 id="How-does-it-work?"><a id="How"></a><a id="How-does-it-work"></a>How does it work?</h2>

<p><code>Test::Inline</code> lets you write small fragments of general or function-specific testing code, and insert it anywhere you want in your modules, inside a specific tagged <a href="https://metacpan.org/pod/perlpod">POD</a> segment, like the following.</p>

<pre><code>  =begin testing
  
  # This code assumes we have a cpuinfo file
  ok( -f /proc/cpuinfo, &#39;Host has a standard /proc/cpuinfo file&#39; );
  
  =end testing
  
  =begin testing label
  
  # Test generation of the &lt;label&gt; HTML tag
  is( My::HTML-&gt;label(&#39;foo&#39;),        &#39;&lt;label&gt;foo&lt;/label&gt;&#39;,           &#39;-&gt;label(simple) works&#39; );
  is( My::HTML-&gt;label(&#39;bar&#39;, &#39;foo&#39;), &#39;&lt;label for=&quot;bar&quot;&gt;foo&lt;/label&gt;&#39;, &#39;-&gt;label(for) works&#39;    );
  
  =end testing</code></pre>

<p>You can add as many, or as few, of these chunks of tests as you wish. The key condition when writing them is that they should be logically independant of each other. Each chunk of testing code should not die or crash if it is run before or after another chunk.</p>

<p>Using <a href="https://metacpan.org/pod/distribution/Test-Inline/script/inline2test">inline2test</a> or another test compiler, you can then transform these chunks in a test script, or an entire tree of modules into a complete set of standard <a href="https://metacpan.org/pod/Test::More">Test::More</a>-based test scripts.</p>

<p>These test scripts can then be executed as normal.</p>

<h2 id="What-is-Test::Inline-good-for?"><a id="What"></a><a id="What-is-Test::Inline-good-for"></a>What is Test::Inline good for?</h2>

<p><code>Test::Inline</code> is incredibly useful for doing ad-hoc unit testing.</p>

<p>In any large groups of modules, you can add testing code here, there and everywhere, anywhere you want. The next time the test compiler is run, a new test script will just appear.</p>

<p>This also makes it great for testing assumptions you normally wouldn&#39;t bother to write run-time code to test. It ensures that your assumptions about the way Perl does some operation, or about the state of the host, are confirmed at install-time.</p>

<p>If your assumption is ever wrong, it gets picked up at install-time and based on the test failures, you can correct your assumption.</p>

<p>It&#39;s also extremely useful for systematically testing self-contained code.</p>

<p>That is, any code which can be independantly tested without the need for external systems such as databases, and that has no side-effects on external systems.</p>

<p>All of this code, written by multiple people, can then have one single set of test files generated. You can check all the bits and pieces of a large API, or anything you like, in fine detail.</p>

<p>Test::Inline also introduces the concept of unit-tested documentation.</p>

<p>Not only can your code be tested, but if you have a FAQ or some other pure documentation module, you can validate that the documentation is correct for the version of the module installed.</p>

<p>If the module ever changes to break the documentation, you can catch it and correct the documentation.</p>

<h2 id="What-is-Test::Inline-bad-for?"><a id="What1"></a><a id="What-is-Test::Inline-bad-for"></a>What is Test::Inline bad for?</h2>

<p><code>Test::Inline</code> is <b>not</b> a complete testing solution, and there are several types of testing you probably DON&#39;T want to use it for.</p>

<ul>

<li><p>Static testing across the entire codebase</p>

</li>
<li><p>Functional testing</p>

</li>
<li><p>Tests with side-effects such as those that might change a testing database</p>

</li>
</ul>

<h2 id="Getting-Started"><a id="Getting"></a>Getting Started</h2>

<p>Because Test::Inline creates test scripts with file names that <b>don&#39;t</b> start with a number (for ordering purposes), the first step is to create your normal test scripts using file names in the CPAN style of <i>01_compile.t</i>, <i>02_main.t</i>, <i>03_foobar.t</i>, and so on.</p>

<p>You can then add your testing fragments wherever you like throughout your code, and use the <i>inline2test</i> script to generate the test scripts for the inline tests. By default the test scripts will be named after the packages/classes that the test fragments are found in.</p>

<p>Tests for Class::Name will end up in the file <code>class_name.t</code>.</p>

<p>These test files sit quite happily alongside your number test scripts.</p>

<p>When you run the test suite as you normally would, the inline scripts will be run after the numbered tests.</p>

<h1 id="METHODS">METHODS</h1>

<h2 id="new">new</h2>

<pre><code>  my $Tests = Test::Inline-&gt;new(
      verbose  =&gt; 1,
      readonly =&gt; 1,
      output   =&gt; &#39;auto&#39;,
      manifest =&gt; &#39;auto/manifest&#39;,
  );</code></pre>

<p>The <code>new</code> constructor creates a new test generation framework. Once the constructor has been used to create the generator, the <code>add_class</code> method can be used to specify classes, or class heirachies, to generate tests for.</p>

<p><b>verbose</b> - The <code>verbose</code> option causes the generator to write state and debugging information to STDOUT as it runs.</p>

<p><b>manifest</b> - The <code>manifest</code> option, if provided, will cause a manifest file to be created and written to disk. The manifest file contains a list of all the test files generated, but listed in the prefered order they should be processed to best satisfy the class-level dependency of the tests.</p>

<p><b>check_count</b> - The <code>check_count</code> value controls how strictly the test script will watch the number of tests that have been executed.</p>

<p>When set to false, the script does no count checking other than the standard total count for scripts (where all section counts are known)</p>

<p>When set to <code>1</code> (the default), <code>Test::Inline</code> does smart count checking, doing section-by-section checking for known-count sections <b>only</b> when the total for the entire script is not known.</p>

<p>When set to <code>2</code> or higher, <code>Test::Inline</code> does full count checking, doing section-by-section checking for every section with a known number of tests.</p>

<p><b>file_content</b> - The <code>file_content</code> option should be provided as a CODE reference, which will be passed as arguments the <code>Test::Inline</code> object, and a single <a href="https://metacpan.org/pod/Test::Inline::Script">Test::Inline::Script</a> object, and should return a string containing the contents of the resulting test file. This will be written to the <code>OutputHandler</code>.</p>

<p><b>output</b> - The <code>output</code> option provides the location of the directory where the tests will be written to. It should both already exist, and be writable. If using a custom <code>OutputHandler</code>, the value of <code>output</code> should refer to the location <b>within the OutputHandler</b> that the files will be written to.</p>

<p><b>readonly</b> - The <code>readonly</code> option, if provided, indicates that any generated test files should be created (or set when updated) with read-only permissions, to prevent accidentally adding to or editing the test scripts directly (instead of via the classes).</p>

<p>This option is currently disabled by default, by may be enabled by default in a future release, so if you do NOT want your tests being created as read-only, you should explicitly set this option to false.</p>

<p><b>InputHandler</b> - The <code>InputHandler</code> option, if provided, supplies an alternative <code>FileHandler</code> from which source modules are retrieved.</p>

<p><b>OuputHandler</b> - The <code>OutputHandler</code> option, if provided, supplies an alternative <code>FileHandler</code> to which the resulting test scripts are written.</p>

<p>Returns a new <code>Test::Inline</code> object on success.</p>

<p>Returns <code>undef</code> if there is a problem with one of the options.</p>

<h2 id="exception">exception</h2>

<p>The <code>exception</code> method returns a flag which indicates whether error will be returned via exceptions.</p>

<h2 id="InputHandler">InputHandler</h2>

<p>The <code>InputHandler</code> method returns the file handler object that will be used to find and load the source code.</p>

<h2 id="ExtractHandler">ExtractHandler</h2>

<p>The <code>ExtractHandler</code> accessor returns the object that will be used to extract the test sections from the source code.</p>

<h2 id="ContentHandler">ContentHandler</h2>

<p>The <code>ContentHandler</code> accessor return the script content generation handler.</p>

<h2 id="OutputHandler">OutputHandler</h2>

<p>The <code>OutputHandler</code> accessor returns the file handler object that the generated test scripts will be written to.</p>

<h2 id="add-$file,-$directory,-\$source,-$Handle"><a id="add"></a><a id="add--file---directory---source---Handle"></a>add $file, $directory, \$source, $Handle</h2>

<p>The <code>add</code> method is a parameter-sensitive method for adding something to the build schedule.</p>

<p>It takes as argument a file path, a directory path, a reference to a SCALAR containing perl code, or an <a href="https://metacpan.org/pod/IO::Handle">IO::Handle</a> (or subclass) object. It will retrieve code from the parameter as appropriate, parse it, and create zero or more <a href="https://metacpan.org/pod/Test::Inline::Script">Test::Inline::Script</a> objects representing the test scripts that will be generated for that source code.</p>

<p>Returns the number of test scripts added, which could be zero, or <code>undef</code> on error.</p>

<h2 id="add_class">add_class</h2>

<pre><code>  $Tests-&gt;add_class( &#39;Foo::Bar&#39; );
  $Tests-&gt;add_class( &#39;Foo::Bar&#39;, recursive =&gt; 1 );</code></pre>

<p>The <code>add_class</code> method adds a class to the list of those to have their tests generated. Optionally, the <code>recursive</code> option can be provided to add not just the class you provide, but all classes below it as well.</p>

<p>Returns the number of classes found with inline tests, and added, including <code>0</code> if no classes with tests are found. Returns <code>undef</code> if an error occurs while adding the class or it&#39;s children.</p>

<h2 id="add_all">add_all</h2>

<p>The <code>add_all</code> method will search the <code>InputHandler</code> for all *.pm files, and add them to the generation set.</p>

<p>Returns the total number of test scripts added, which may be zero, or <code>undef</code> on error.</p>

<h2 id="classes">classes</h2>

<p>The <code>classes</code> method returns a list of the names of all the classes that have been added to the <code>Test::Inline</code> object, or the null list <code>()</code> if nothing has been added.</p>

<h2 id="class">class</h2>

<p>For a given class name, fetches the <a href="https://metacpan.org/pod/Test::Inline::Script">Test::Inline::Script</a> object for that class, if it has been added to the <code>Test::Inline</code> object. Returns <code>undef</code> if the class has not been added to the <code>Test::Inline</code> object.</p>

<h2 id="filenames">filenames</h2>

<p>For all of the classes added, the <code>filenames</code> method generates a map of the filenames that the test files for the various classes should be written to.</p>

<p>Returns a reference to a hash with the classes as keys, and filenames as values.</p>

<p>Returns <code>0</code> if there are no files to write.</p>

<p>Returns <code>undef</code> on error.</p>

<h2 id="schedule">schedule</h2>

<p>While the <code>filenames</code> method generates a map of the files for the various classes, the <code>schedule</code> returns the list of file names in the order in which they should actually be executed.</p>

<p>Returns a reference to an array containing the file names as strings.</p>

<p>Returns <code>0</code> if there are no files to write.</p>

<p>Returns <code>undef</code> on error.</p>

<h2 id="manifest">manifest</h2>

<p>The <code>manifest</code> generates the contents of the manifest file, if it is both wanted and needed.</p>

<p>Returns the contents of the manifest file as a normal string, false if it is either not wanted or needed, or <code>undef</code> on error.</p>

<h2 id="save">save</h2>

<pre><code>  $Tests-&gt;save;</code></pre>

<p>The <code>save</code> method generates the test files for all classes, and saves them to the <code>output</code> directory.</p>

<p>Returns the number of test files generated. Returns <code>undef</code> on error.</p>

<h1 id="TO-DO"><a id="TO"></a>TO DO</h1>

<p>- Add support for <code>example</code> sections</p>

<p>- Add support for <code>=for</code> sections</p>

<h1 id="ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</h1>

<p>Thank you to Phase N (<a href="http://phase-n.com/">http://phase-n.com/</a>) for permitting the open sourcing and release of this distribution.</p>

<h1 id="BUGS">BUGS</h1>

<p>The &quot;Extended =begin&quot; syntax used for non-trivial sections is not formalised as part of the POD spec yet, although it is on the track to being included.</p>

<p>While simple &#39;=begin testing&#39; sections are fine and will pass POD testing, extended begin sections may cause POD errors.</p>

<p>Bugs may be submitted through <a href="https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Inline">the RT bug tracker</a> (or <a href="mailto:bug-Test-Inline@rt.cpan.org">bug-Test-Inline@rt.cpan.org</a>).</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Adam Kennedy &lt;adamk@cpan.org&gt;</p>

<h1 id="CONTRIBUTORS">CONTRIBUTORS</h1>

<ul>

<li><p>Adam Kennedy &lt;adam@ali.as&gt;</p>

</li>
<li><p>Karen Etheridge &lt;ether@cpan.org&gt;</p>

</li>
<li><p>Ricardo Signes &lt;rjbs@cpan.org&gt;</p>

</li>
</ul>

<h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1>

<p>This software is copyright (c) 2003 by Adam Kennedy.</p>

<p>This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Test::Inline, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Test::Inline</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Test::Inline</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Test::Inline.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
